

# Naming Convention: north, south, etc. territories are denoted by a lower case n, s, e, & w in
# front of a camel caps of the territories name. 
# i.e. North America = nAmerica

#continents
africa = "Africa"
asia = "Asia"
australia = "Australia"
europe = "Euorpe"
nAmerica = "North America"
sAmerica = "South America"

#territories

eAfrica = "East Africa"
nAfrica = "North Africa"
sAfrica = "South Africa"
cAmerica = "Centeral America"
wAustralia = "West Australia"
eAustralia = "East Australia"
alberta = "Alberta"
alaska = "Alaska"
afganistan = "Afganistan"
argentina = "Argentina"
brazil = "Brazil"
congo = "Congo"
china = "China"
egypt = "Egypt"
nEurope = "Northern Europe"
wEurope = "Western Europe"
sEurope = "Southern Europe"
greatBritain = "Great Britian"
greenland = "Greenland"
iceland = "Iceland"
irkutsk = "Irkutsk"
india = "India"
indonesia = "Indonesia"
japan = "Japan"
kamchatka = "Kamchatka"
madagascar = "Madagascar"
mongolia = "Mongolia"
middleEast = "Middle East"
newGuinea = "New Guinea"
ontario = "Ontario"
peru = "Peru"
quebec = "Quebec"
scandinavia = "Scandinavia"
siberia = "Siberia"
siam = "Siam"
nwTerritory = "Northwest Territory"
ukraine = "Ukraine"
ural = "Ural"
wUnitedStates = "Western United States"
eUnitedStates = "Eastern United States"
venezuela = "Venezuela"
yakutsk = "Yakutsk"

#dictionary declarations
routes = {}
territories= {}
continent = {}
extraArmiesCont = {}
coordinates = {}

#static list initization
allContinents = [
              africa,
              asia,
              australia,
              europe,
              nAmerica, 
              sAmerica
              ]

allTerritories = [
                  eAfrica,
                  nAfrica,
                  sAfrica,
                  cAmerica,
                  wAustralia,
                  eAustralia,
                  alberta,
                  alaska,
                  afganistan,
                  argentina,
                  brazil,
                  congo,
                  china,
                  egypt,
                  nEurope,
                  wEurope,
                  sEurope,
                  greatBritain,
                  greenland,
                  iceland,
                  irkutsk,
                  india,
                  indonesia, 
                  japan,
                  kamchatka,
                  madagascar,
                  mongolia,
                  middleEast,
                  newGuinea,
                  ontario,
                  peru,
                  quebec,
                  scandinavia,
                  siberia,
                  siam,
                  nwTerritory, 
                  ukraine,
                  ural,
                  wUnitedStates,
                  eUnitedStates,
                  venezuela,
                  yakutsk
                  ]

#initialize territories by continent

territories[africa] = [
                      congo,
                      egypt,
                      nAfrica,
                      eAfrica,
                      sAfrica,
                      madagascar
                      ]

territories[sAmerica] = [
                      venezuela,
                      peru,
                      brazil,
                      argentina
                      ]

territories[nAmerica] = [
                        alaska,
                        nwTerritory,
                        alberta,
                        greenland,
                        ontario,
                        quebec,
                        wUnitedStates,
                        eUnitedStates,
                        cAmerica
                        ]

territories[asia] = [
                     ural,
                     siberia,
                     yakutsk,
                     kamchatka,
                     irkutsk,
                     mongolia,
                     china,
                     japan,
                     siam,
                     india,
                     afganistan,
                     middleEast
                     ]

territories[europe] = [
                       iceland,
                       greatBritain,
                       scandinavia,
                       ukraine,
                       nEurope,
                       wEurope,
                       sEurope,
                       ]

territories[australia] = [
                          indonesia,
                          newGuinea,
                          wAustralia,
                          eAustralia
                          ]

#set territories to a continent

for c , ts in territories.iteritems():
    for t in ts:
        continent[t] = c

#initialize routes between territories, assigned by alphabetical order

routes[alaska] = [
                  nwTerritory,
                  alberta,
                  kamchatka
                  ]

routes[nwTerritory] = [ontario]

routes[alberta] = [
                   ontario,
                   nwTerritory,
                   wUnitedStates
                   ]

routes[greenland] = [
                     quebec,
                     iceland,
                     nwTerritory, 
                     ontario
                     ]

routes[ontario] = [
                   quebec, 
                   wUnitedStates
                   ]

routes[quebec] = []

routes[wUnitedStates] = []

routes[eUnitedStates]= [
                        wUnitedStates,
                        quebec,
                        ontario
                        ]
routes[cAmerica] = [
                    eUnitedStates,
                    wUnitedStates,
                    venezuela
                    ]

routes[venezuela] = []

routes[brazil] = [
                  venezuela,
                  peru, 
                  nAfrica
                  ]

routes[peru] = [venezuela]

routes[argentina] = [
                     peru,
                     brazil
                     ]

routes[nAfrica] = [
                   wEurope,
                   sEurope
                   ]

routes[egypt] = [
                 sEurope,
                 middleEast
                 ]

routes[eAfrica] = [
                   egypt,
                   nAfrica,
                   madagascar,
                   sAfrica, 
                   middleEast
                   ]

routes[congo] = [
                 eAfrica,
                 sAfrica, 
                 nAfrica
                 ]

routes[sAfrica] = []

routes[middleEast] = [ukraine]

routes[india] = [
                 siam,
                 middleEast
                 ]

routes[siam] = []

routes[indonesia] = [
                     siam,
                     newGuinea,
                     wAustralia
                     ]

routes[newGuinea] = [wAustralia]

routes[wAustralia] = []

routes[eAustralia] = [
                      newGuinea,
                      wAustralia
                      ]

routes[china] = [
                 siam,
                 india,
                 mongolia,
                 ural, 
                 siberia
                 ]

routes[afganistan] = [
                      china,
                      india,
                      middleEast, 
                      ukraine, 
                      ural
                      ]

routes[ural] = [siberia]

routes[ukraine] = [
                   ural,
                   scandinavia
                   ]

routes[siberia] = [yakutsk]

routes[irkutsk] = [
                   kamchatka,
                   mongolia,
                   siberia,
                   yakutsk
                   ]
routes[kamchatka] = [
                     yakutsk,
                     mongolia
                     ]
routes[japan] = [
                 mongolia,
                 kamchatka
                 ]

routes[mongolia] = []

routes[yakutsk] = []

routes[sEurope] = [wEurope]
routes[wEurope] = []

routes[nEurope] = [
                   sEurope,
                   wEurope, 
                   ukraine,
                   scandinavia, 
                   ]

routes[greatBritain] = [
                        nEurope,
                        wEurope,
                        scandinavia,
                        iceland
                        ]
routes[madagascar] = [sAfrica]
routes[scandinavia] = [ukraine]

routes[iceland] = [
                   scandinavia
                   ]

#adds the reverse to order to the routes 

for r1, r2s in routes.iteritems():
    for r2 in r2s:
        if r1 not in routes[r2]:
            routes[r2].append(r1)
     
extraArmiesCont[asia] = 7
extraArmiesCont[nAmerica] = 5
extraArmiesCont[europe] = 5
extraArmiesCont[africa] = 3
extraArmiesCont[australia] = 2
extraArmiesCont[sAmerica] = 2

#pointDictionary
coordinates[alaska] = (60,94)
coordinates[nwTerritory] = (144,91)
coordinates[alberta] = (130,142)
coordinates[ontario] = (193,159)
coordinates[quebec] = (259,159)
coordinates[wUnitedStates] = (137,213)
coordinates[eUnitedStates] = (208,231)
coordinates[cAmerica] = (144,280)
coordinates[venezuela] = (215,345)
coordinates[peru] = (226,418)
coordinates[brazil] = (284,399)
coordinates[argentina] = (236,493)
coordinates[greenland] = (307,59)
coordinates[iceland] = (386,127)
coordinates[scandinavia] = (465,107)
coordinates[greatBritain] = (374,199)
coordinates[nEurope] = (450,206)
coordinates[wEurope] = (382,286)
coordinates[ukraine] = (551,169)
coordinates[nAfrica] = (425,372)
coordinates[egypt] = (487,350)
coordinates[eAfrica] = (523,411)
coordinates[congo] = (485,452)
coordinates[madagascar] = (570,526)
coordinates[middleEast] = (561,306)
coordinates[afganistan] = (609,233)
coordinates[ural] = (629,148)
coordinates[siberia] = (676,108)
coordinates[yakutsk] = (746,73)
coordinates[kamchatka] = (817,76)
coordinates[irkutsk]  = (727,158)
coordinates[mongolia] = (733,215)
coordinates[china] = (716,275)
coordinates[india] = (654,310)
coordinates[siam] = (726,345)
coordinates[indonesia] = (738,442)
coordinates[newGuinea] = (818,416)
coordinates[wAustralia] = (775,527)
coordinates[eAustralia] = (830,505)
coordinates[japan] = (828,217)
coordinates[sAfrica] = (496,522)
coordinates[sEurope] = (459,255)

#These were declared twice

#extraArmiesCont[asia] = 7
#extraArmiesCont[nAmerica] = 5
#extraArmiesCont[europe] = 5
#extraArmiesCont[africa] = 3
#extraArmiesCont[australia] = 2
#extraArmiesCont[sAmerica] = 2

##ColorList

#colorList = [Color.Blue,
#             Color.Red,
#             Color.Orange,
#             Color.Purple,
#             Color.Azure,
#             Color.Pink,
#             Color.Cyan,
#             Color.Crimson,
#             Color.BlanchedAlmond,
#             Color.Bisquee,
#             Color.DodgerBlue]

#testing dictionaries 


#print extraArmies
#for c in allContinents:
#    print c + " " + str(extraArmiesCont[c])
#print "continents" 
#for c in allContinents:
#    print c
#    print territories[c]
#print "territories:"
#for t in allTerritories:
#    print t
#    print continent[t]
#    print routes[t]


